package cn.wizzer.app.crown.modules.services;

import cn.wizzer.app.crown.modules.models.CrownLeague;
import cn.wizzer.app.crown.modules.models.enums.MatchTypeEnum;
import cn.wizzer.framework.base.service.BaseService;
import cn.wizzer.framework.page.Pagination;
import org.nutz.dao.pager.Pager;

import java.util.Date;
import java.util.List;

public interface CrownLeagueService extends BaseService<CrownLeague> {

    CrownLeague queryByLeagueInfo(MatchTypeEnum type, String league, String championName, Date dateTime);

    /**
     * 手动结算冠军订单
     *
     * @param league 冠军联赛对象
     */
    void settleChampion(CrownLeague league);

    /**
     * 手动爬取联赛赛果
     *
     * @param startTime
     * @param endTime
     */
    void crawlLeagueResult(Long startTime, Long endTime);

    /**
     * 更新赛果
     *
     * @param league
     */
    void updateResult(CrownLeague league);


    /**
     * 冠军赛果列表
     *
     * @param start     开始日期
     * @param end       结束日期
     * @param pager     分页数据
     * @param sportType 赛事类型 FOOTBALL BASKETBALL
     * @return
     */
    Pagination results(String start, String end, Pager pager, String sportType);
}
